package com.wang.dao;

import com.wang.pojo.User;
import org.mybatis.spring.SqlSessionTemplate;

public class UserMapperImpl implements UserMapper{
    private  SqlSessionTemplate sqlSessionTemplate;

    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    public User getUser(int id) {
        UserMapper mapper=sqlSessionTemplate.getMapper(UserMapper.class);
        return mapper.getUser(id);
    }
}
